package com.rongji.dfish.hello.index.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.rongji.dfish.hello.index.view.IndexView;
import com.rongji.dfish.hello.pub.controller.CommonController;
import com.rongji.dfish.ui.layout.View;

@RequestMapping("/index")
@Controller
public class IndexController extends CommonController {
	@Autowired
	private IndexView indexView;

	public IndexView getIndexView() {
		return indexView;
	}

	public void setIndexView(IndexView indexView) {
		this.indexView = indexView;
	}

	@RequestMapping("/index")
	@ResponseBody
	public Object index(HttpServletRequest request) throws Exception {
		View view = indexView.buildIndexView();
		return view;
	}

}
